package com.tc.dispatch.web.schedule.dispatch;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;

public class showpic extends HttpServlet {
  private static final String CONTENT_TYPE = "text/html; charset=GBK";
  //Initialize global variables
  public void init() throws ServletException {
  }
  //Process the HTTP Get request
  public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType(CONTENT_TYPE);
    response.setContentType("text/xml; charset=GBK");
    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Pragma", "no-cache");
    response.setHeader("Expires", "Thu,   01   Dec   1900   16:00:00   GMT");

    PrintWriter out = response.getWriter();

    out.write("<html>\r\n");
    out.write("<head>\r\n");
    out.write("<title>\r\nshow_picture\r\n");
    out.write("</title>\r\n");
    out.write("</head>\r\n");
    String src=request.getParameter("src");

    out.println("<body bgcolor=\"#ffffff\">");
    out.println("<img src=");
    out.println(src);
    out.println(">");
    out.println("<p>The servlet has received a GET. This is the reply.</p>");
    out.println("</body></html>");
  }
  //Clean up resources
  public void destroy() {
  }
}